/**
 * Created with IntelliJ IDEA.
 * Description
 * User: cjc
 * Date: 2025-03-02
 * Time: 20:47
 */
public class Test3 {
    public static void main(String[] args) {
        int a = 10;
        int b = 20;
        System.out.println("交换前：a = "+a+",b = "+b);
        swap(a,b);
        System.out.println("交换后：a = "+a+",b = "+b);
    }
    public static void swap(int a,int b) {
        int temp = a;
        a = b;
        b = temp;
    }
}
